home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sweet! Digizine 1.1
/
6 Sweet! Digizine 1.1 (RETAIL).iso
/
INSTALL.RUL
< prev
next >
Wrap
Text File
|
1997-05-06
|
6KB
|
263 lines
// Ishield script file for Pocohontas by Pixel Genius
// 6/24/95 modified 10/29/95
declare
#define SPACE_NEEDED 3838450
string szText [ 255 ];
string szDisk [3];
string szTemp [255];
string szDefPath [255];
string szBitmapPath [255];
string szResultPath [255];
string szResultPathX [255];
string szProgramPath [255];
string szWorkingPath [255];
string szReadme [255];
string szQtPath [255];
string szIconPath [ 255 ];
string szFileName [255];
string szPathFile [ 255 ];
number nspace;
number ntemp;
number listID;
number nTextMaxLines;
number nFontPointSize;
number nStatusWindowID;
number nCheck;
program
anyword:
SetColor ( STATUSBAR, RED );
// Blue Gradiant from top to bottom
SetColor ( BACKGROUND,
QUAD( BK_RESET, 0, 0, 0 ) );
SetColor ( BACKGROUND,
QUAD( BK_VERT_TOP, 0, 0, 255 ) );
SetColor ( BACKGROUND,
QUAD( BK_VERT_BOTTOM, 0, 0, 50 ) );
SetColor ( BACKGROUND,
QUAD( BK_COMPLETE, 0, 0, 0 ) );
SetFont (FONT_TITLE, STYLE_NORMAL, "System" );
SetTitle ("Sweet! Digizine Installation Program", 24, BLACK );
// MS look routine
nTextMaxLines = 3;
nFontPointSize = 9;
nStatusWindowID = StatusCreate( STYLE_DEFAULT ,
nTextMaxLines ,
"System" ,
nFontPointSize ,
STYLE_NORMAL );
StatusSelect( nStatusWindowID );
//Enable ( BITMAPFADE );
Enable ( EXIT );
Disable ( HELP );
Disable ( PAUSE );
Disable ( INFO );
Enable ( FEEDBACK_OPERATION );
Enable ( STATUS );
Enable ( BACKGROUND );
GetDisk( TARGETDIR, szDisk );
szDefPath = szDisk ^ "SWEET";
SetStatusWindow ( 10, "Installing Sweet! Program" );
TargetLocation:
AskPath ( "Please enter the desired location for the Sweet Digizine?", szDefPath, szResultPath );
if LAST_RESULT = 0 then call ConfirmCancel;
endif;
if szResultPath = SRCDIR then
MessageBox ( "The target location must be different than the source. Please specify a different location.", SEVERE );
goto TargetLocation;
endif;
CreateDir( szResultPath );
// This creates the Xtras folder inside the sweet folder
szResultPathX = szResultPath ^ "\\XTRAS";
CreateDir( szResultPathX );
if LAST_RESULT = 0 then goto DirCreated;
endif;
MessageBox ( "Unable to create directory. Please enter a valid path", SEVERE );
goto TargetLocation;
DirCreated:
GetDiskSpace ( szResultPath );
if LAST_RESULT < SPACE_NEEDED then
MessageBox ( "Not enough space on the drive specified. Try another drive.", SEVERE );
goto TargetLocation;
endif;
SetStatusWindow ( 30, "Ready to copy files." );
TARGETDIR = szResultPath;
SetStatusWindow ( 35, "Installing Sweet program files ..." );
// Copy files from cd
//CopyFile ( "FILEIO.DLL", "FILEIO.DLL" );
CopyFile ( "SWEET.EXE", "SWEET.EXE" );
CopyFile ( "README.TXT", "README.TXT" );
CopyFile ( "SWEET.INI", "SWEET.INI" );
CopyFile ( "SWEET.ICO", "SWEET.ICO" );
CopyFile ( "README.TXT", "DUMM.TXT" );
// make files hidden
// Use List of Files to make hidden
// Create file list
listID = ListCreate( STRINGLIST );
if ( listID = LIST_NULL ) then
MessageBox( "List not created, fatal error", SEVERE );
endif;
// Add elements to file list
ListAddString ( listID, "SWEET.INI", AFTER );
//ListAddString ( listID, "FILEIO.DLL", AFTER );
ListAddString ( listID, "SWEET.ICO", AFTER );
ListAddString ( listID, "DUMM.TXT", AFTER );
//set files in list to hidden
nCheck = ListGetFirstString( listID,
szFileName );
while ( nCheck = 0 )
szPathFile = szResultPath ^ szFileName;
SetFileInfo( szPathFile,
FILE_ATTRIBUTE,
FILE_ATTR_HIDDEN,
"" );
nCheck = ListGetNextString ( listID,
szFileName );
endwhile;
//clears list
ListDestroy ( listID );
// This section is for copying the Xtras folder
TARGETDIR = szResultPathX;
SetStatusWindow ( 55, "Installing Sweet program files ..." );
// Copy files from cd
//CopyFile ( "QTVRW.QTC", "QTVRW.QTC" );
CopyFile ( "FILEIO16.X16", "FILEIO16.X16" );
CopyFile ( "FILEIO.X32", "FILEIO.X32" );
CopyFile ( "Pomlite.x16", "Pomlite.x16" );
CopyFile ( "Pomlite.x32", "Pomlite.x32" );
CopyFile ( "FILESUPT.X16", "FILESUPT.X16" );
CopyFile ( "FILESUPT.X32", "FILESUPT.X32" );
// make files hidden
// Use List of Files to make hidden
// Create file list
listID = ListCreate( STRINGLIST );
if ( listID = LIST_NULL ) then
MessageBox( "List not created, fatal error", SEVERE );
endif;
// Add elements to file list Apparently I can╒t hide Xtras without causing an error
//ListAddString ( listID, "QTVRW.QTC", AFTER );
//ListAddString ( listID, "FILEIO16.X16", AFTER );
//ListAddString ( listID, "FILEIO.X32", AFTER );
//ListAddString ( listID, "Pomlite.x16", AFTER );
//ListAddString ( listID, "Pomlite.x32", AFTER );
//set files in list to hidden
nCheck = ListGetFirstString( listID,
szFileName );
while ( nCheck = 0 )
szPathFile = szResultPathX ^ szFileName;
SetFileInfo( szPathFile,
FILE_ATTRIBUTE,
FILE_ATTR_HIDDEN,
"" );
nCheck = ListGetNextString ( listID,
szFileName );
endwhile;
//clears list
ListDestroy ( listID );
SetStatusWindow ( 80, "Finished coying files..." );
//This sets the TARGETDIR back to the Sweet folder
TARGETDIR = szResultPath;
//pre-written quick time routine I cannot test
//Launch QuickTime Installer
//szQtPath = "D:\\WIndows\\QTW_203\\end_user\\setup.exe";
szQtPath = SRCDIR;
szQtPath = szQtPath ^ "QTW\\QTINSTAL.EXE";
LaunchAppAndWait ( szQtPath, "", WAIT );
szQtPath = szQtPath ^ "QTW\\QTVR16.EXE";
LaunchAppAndWait ( szQtPath, "", WAIT );
//pre-written quicktime VR routine I cannot test
SetStatusWindow ( 90, "Creating Program Group..." );
szProgramPath = TARGETDIR ^ "SWEET.EXE";
szWorkingPath = TARGETDIR;
szIconPath = TARGETDIR ^ "SWEET.EXE";
AddProgItemEx( "SWEET DIGIZINE",
"SWEET",
szProgramPath,
szWorkingPath,
szIconPath,
0,
"",
0 );
SetStatusWindow ( 100, "Done installing files ..." );
AskYesNo ( "Installation is complete. Would you like to start the Sweet Digizine?", YES );
if LAST_RESULT = NO then exit;
endif;
LaunchApp ( szProgramPath, "" );
exit;
ConfirmCancel:
AskYesNo ( "Are you sure you want to CANCEL installation?", NO );
if LAST_RESULT = NO then return; endif;
exit;